define(["jquery", "easy-admin", "treetable"], function ($, ea) {
    var table = layui.table,
        treetable = layui.treetable;
    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'mall.finance/index',
        edit_url: 'mall.finance/edit',
        export_url: 'mall.finance/export',
        refund_url:'mall.finance/refund'
    };
    var Controller = {
        index: function () {
            ea.table.render({
                init: init,
                height:'full-50',
                toolbar: ['refresh',
                    [],'export'],
                cols: [[
                    {type: 'checkbox'},
                    {field: 'title', title: '店铺名称'},
                    {field: 'is_express', title: '类型',selectList:{0:'商品',1:'商品+快递'}},
                    {field: 'count', title: '收益数量',search: false},
                    {field: 'money', title: '收益金额', search:false},
                    {field: 'express_numbers', title: '支付快递数量', search:false},
                    {field: 'express_price', title: '支付快递金额', search:false},
                    {field: 'create_time', title: '交易时间', search: 'range'},

                ]],
            });
            ea.listen();
        },
        edit:function (){
            ea.listen();
        }
    }
    return Controller;
});